import request from '@/utils/request'
//优惠券管理页面
/**
 * 新增优惠券信息
 * @param {*} data
 * @returns
 */
export function addSmsCoupon(data) {
    return request({
        url: '/business-server/smsCoupon/create',
        method: 'post',
        data
    })
}

/**
 * 删除优惠券信息
 * @param {*} data
 * @returns
 */
export function delSmsCoupon(data) {
    return request({
        url: '/business-server/smsCoupon/delete',
        method: 'post',
        data
    })
}

/**
 * 修改优惠券信息
 * @param {*} data
 * @returns
 */
export function upSmsCoupon(data) {
    return request({
        url: '/business-server/smsCoupon/update',
        method: 'post',
        data
    })
}

/**
 * 获取优惠券信息
 * @param {*} data
 * @returns
 */
export function getSmsCouponList(data) {
    return request({
        url: '/business-server/smsCoupon/page',
        method: 'post',
        data
    })
}


/**
 * 获取单个优惠券信息
 * @param {*} data
 * @returns
 */
export function getSmsCouponListById(id, data) {
    return request({
        url: `/business-server/smsCoupon/${id}`,
        method: 'get',
        params: data
    })
}

//员工退出管理页面
/**
 * 新增退出交接清单模板
 * @param {*} data
 * @returns
 */
export function addStrHandover(data) {
    return request({
        url: '/system-server/storeHandoverTemplate/add',
        method: 'post',
        data
    })
}

/**
 * 删除退出交接清单模板
 * @param {*} data
 * @returns
 */
export function delStrHandover(data) {
    return request({
        url: '/system-server/storeHandoverTemplate/delete',
        method: 'post',
        data
    })
}

/**
 * 修改退出交接清单模板
 * @param {*} data
 * @returns
 */
export function upStrHandover(data) {
    return request({
        url: '/system-server/storeHandoverTemplate/update',
        method: 'post',
        data
    })
}

/**
 * 获取退出交接清单模板
 * @param {*} data
 * @returns
 */
export function getStrHandoverList(data) {
    return request({
        url: '/system-server/storeHandoverTemplate/list',
        method: 'get',
        params: data
    })
}

//员工退出申请管理页面
/**
 * 新增退出申请
 * @param {*} data
 * @returns
 */
export function addApply(data) {
    return request({
        url: '/system-server/storeEmpLeaveApply/add',
        method: 'post',
        data
    })
}

/**
 * 删除退出申请
 * @param {*} data
 * @returns
 */
export function delApply(data) {
    return request({
        url: '/system-server/storeEmpLeaveApply/remove',
        method: 'post',
        data
    })
}

/**
 * 修改退出申请
 * @param {*} data
 * @returns
 */
export function upApply(data) {
    return request({
        url: '/system-server/storeEmpLeaveApply/update',
        method: 'post',
        data
    })
}

/**
 * 提交退出申请
 * @param {*} data
 * @returns
 */
export function submitApply(data) {
    return request({
        url: '/system-server/storeEmpLeaveApply/submit',
        method: 'post',
        data
    })
}

/**
 * 查询自己的退出申请记录
 * @param {*} data
 * @returns
 */
export function getSelfApplyList(data) {
    return request({
        url: '/system-server/storeEmpLeaveApply/findSelfApplyList',
        method: 'get',
        params: data
    })
}

/**
 * 根据退出申请查询交接清单列表
 * @param {*} data
 * @returns
 */
export function getStrHodListByApplyId(data) {
    return request({
        url: '/system-server/storeEmpHandoverList/findListByApplyId',
        method: 'get',
        params: data
    })
}

/**
 * 查询所有待审批与审批通过的记录
 * @param {*} data
 * @returns
 */
export function getExamApplyList(data) {
    return request({
        url: '/system-server/storeEmpLeaveApply/findApplyListForExamine',
        method: 'get',
        params: data
    })
}

/**
 * 审扯同意或者驳回
 * @param {*} data
 * @returns
 */
export function examApply(data) {
    return request({
        url: '/system-server/storeEmpLeaveApply/examine',
        method: 'post',
        data
    })
}

/**
 * 获取退出申请日志
 * @param {*} data
 * @returns
 */
export function getExamLogList(data) {
    return request({
        url: '/system-server/storeEmpLeaveExamineLog/listByApplyId',
        method: 'get',
        params: data
    })
}


/**
 * 批量删除交接清单
 * @param {*} data
 * @returns
 */
export function batchRemove(data) {
    return request({
        url: '/system-server/storeEmpHandoverList/batchRemove',
        method: 'post',
        data
    })
}

/**
 * 批量保存
 * @param {*} data
 * @returns
 */
export function batchSave(data) {
    return request({
        url: '/system-server/storeEmpHandoverList/batchSave',
        method: 'post',
        data
    })
}

/**
 * 外部技师组织机构查询
 * @param {*} data
 * @returns
 */
export function getOutSideOrg(data) {
    return request({
        url: '/system-server/sysOrganization/getOutSideOrg',
        method: 'get',
        params: data
    })
}